{extend name="template/base" /}
{block name="content"}
<div class="page-container">
    <div class="toptip">
    <h2>提示：</h2>
    <p>
      建立总题库，上传全部试题，制定分题库规则，自动生成分题库<br>     
    </p>
 </div>
<div class="cl pd-5 bg-1 bk-gray form-search">
    <form class="mb-20" method="get" action="{:\\think\\Url::build($Request.action)}">
        <input type="text" class="input-text itext" placeholder="搜索题库" name="name" value="{$Request.param.name}" >
        <button type="submit" class="btn btn-success radius"><i class="Hui-iconfont">&#xe665;</i> 查 询</button>
    </form>
</div>
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="l">  
            <a href="javascript:;" onclick="layer_open('添加', '/admin/qbank/add.html',{w:'100%',h:'100%'})" class="btn btn-success radius mr-5" id="b1"><i class="Hui-iconfont"></i>添加</a>

            <a href="javascript:;" onclick="forbid_all('/admin/qbank/forbid.html')" class="btn btn-warning radius mr-5"><i class="Hui-iconfont"></i> 禁用</a>
            <a href="javascript:;" onclick="resume_all('/admin/qbank/resume.html')" class="btn btn-success radius mr-5"><i class="Hui-iconfont"></i> 恢复</a>
            <a href="javascript:;" onclick="del_all('/admin/qbank/delete.html')" class="btn btn-danger radius mr-5"><i class="Hui-iconfont"></i> 删除</a>


            {if $statistics['code'] gt 0}
		    {if UID!=1}	<a href="javascript:;" onclick="layer_open('题库继承', '/admin/qbank/inherit.html',{w:'100%',h:'100%'})" class="btn btn-success radius mr-5" id="b1"><i class="Hui-iconfont"></i>题库继承</a>{/if}
            <a href="/admin/paper/inherit.html" style="color: #ff2a00;text-decoration: none;">你有新的题库需要继承</a>
            {else}
            {if UID!=1}   <a href="javascript:;" onclick="layer_open('题库继承', '/admin/qbank/inherit.html',{w:'100%',h:'100%'})" class="btn btn-success radius mr-5"><i class="Hui-iconfont"></i>题库继承</a>{/if}
            {/if}

        </span>
        <span class="r pt-5 pr-5">
            共有 <strong>{$count ?? '0'}</strong> 个题库
        </span>
    </div>
    <table class="table table-border table-bordered table-hover table-bg mt-20">
        <thead>
        <tr class="text-c">
            {include file="th" /}
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="vo"}
        <tr class="text-c">
            {include file="td" /}
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page-bootstrap">{$page ?? ''}</div>
</div>
{/block}
{block name="script"}

<script>

function resume_all1(id,pro){

	layer.confirm('您确定要完全继承题库：'+pro+'？', {
		  btn: ['确定','取消'] //按钮
		}, function(){
			var index =	layer.load(1, {
							  shade: [0.1,'#fff'] //0.1透明度的白色背景
							});
		  $.post("/admin/qbank/sharing",{parentid:id},function(result){
				layer.close();
				layer.msg(result.msg);
				if(!result.code){
				 location.reload();
				}
				
			});
		
		}, function(){
		  
		});
	
}

</script>
<!--抖动-->
 <script type="text/javascript">
    $(document).ready(function(){
        var b1 = $('#b1');
         var p1 = new waterFloat(b1,900,3,8);
     });
</script>

{/block}
